import java.util.List;

public class StuClass {
    String clsNum;
    String name;
//    Student
    List<Student> students;

    public double avgAge(){
        double avg=0;
        for (Student student : students) {
            avg+=student.getAge();
        }
        return avg/students.size();
    }

    public  int cntOfMale(){
        int cnt=0;
        for (Student student : students) {
//            if(student.sex.equals("男人")){
//            if("男".equals(student.sex)){
            if(Student.MALE.equals(student.sex)){
                cnt++;
            }
        }
        return cnt;
    }

    public  int cntOfFemale(){
        int cnt=0;
        for (Student student : students) {
//            if(student.sex.equals("男人")){
//            if("女".equals(student.sex)){
            if(Student.FEMALE.equals(student.sex)){
                cnt++;
            }
        }
        return cnt;
    }
}
